-- GENERATED SPELL FOR [Shadowpine Hexxer] --


function spell0_16346(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(17201,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16346', 642, 1)
end

function spell1_16346(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(29044,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16346', 3323, 1)
end

function Sorts_16346(pUnit, Event)
local choix_sorts_16346 = math.random(0, 1)
if choix_sorts_16346 == 0 then
pUnit:RegisterEvent('spell0_16346', 1, 1)
end
if choix_sorts_16346 == 1 then
pUnit:RegisterEvent('spell1_16346', 1, 1)
end
end

function mob16346_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16346', math.random(1500, 3000), 1)
end

function mob16346_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16346_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16346_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16346, 1, 'mob16346_Action')
RegisterUnitEvent(16346, 2, 'mob16346_Leave')
RegisterUnitEvent(16346, 3, 'mob16346_Kill')
RegisterUnitEvent(16346, 4, 'mob16346_Die')
